import React from 'react';
import Loadable from 'react-loadable';
import RouteLoading from 'components/RouteLoading';

export default [
  {
    exact: true,
    path: '/student_center/my_courses',
    owner: '/student_center',
    redirect: '/student_center/my_courses/layout/live_course_list'
  },
  {
    exact: true,
    path: '/student_center/my_courses/layout/live_course_list',
    owner: '/student_center/my_courses',
    component: Loadable({
      loader: () => import('./live_course_list'),
      loading: () => <RouteLoading />
    })
  },
  {
    exact: true,
    path: '/student_center/my_courses/layout/recorded_course_list',
    owner: '/student_center/my_courses',
    component: Loadable({
      loader: () => import('./recorded_course_list'),
      loading: () => <RouteLoading />
    })
  },
  {
    exact: false,
    path: '/student_center/my_courses',
    owner: '/student_center',
    component: Loadable({
      loader: () => import('./layout'),
      loading: () => <RouteLoading />
    })
  },
  {
    exact: true,
    path: '/student_center/my_courses/layout/course_material',
    owner: '/student_center/my_courses',
    component: Loadable({
      loader: () => import('./course_material'),
      loading: () => <RouteLoading />
    })
  },
  {
    exact: true,
    path: '/student_center/my_courses/layout/more_course_material/:courseId',
    owner: '/student_center/my_courses',
    component: Loadable({
      loader: () => import('./course_material/more_course_material'),
      loading: () => <RouteLoading />
    })
  },
  {
    exact: true,
    path: '/student_center/my_courses/layout/daily_challenge',
    owner: '/student_center/my_courses',
    component: Loadable({
      loader: () => import('./daily_challenge'),
      loading: () => <RouteLoading />
    })
  },
  {
    exact: true,
    path: '/student_center/my_courses/layout/course_detail',
    owner: '/student_center/my_courses',
    component: Loadable({
      loader: () => import('./course_detail'),
      loading: () => <RouteLoading />
    })
  },
  {
    exact: true,
    path: '/student_center/my_courses/layout/notes_in_class',
    owner: '/student_center/my_courses',
    component: Loadable({
      loader: () => import('./notes_in_class'),
      loading: () => <RouteLoading />
    })
  },
  {
    exact: true,
    path: '/student_center/my_courses/layout/public_class',
    owner: '/student_center/my_courses',
    component: Loadable({
      loader: () => import('./public_class'),
      loading: () => <RouteLoading />
    })
  },
  {
    exact: true,
    path: '/student_center_/my_courses/layout/homework',
    owner: '/',
    component: Loadable({
      loader: () => import('./live_course_list/homework'),
      loading: () => <RouteLoading />
    })
  },
  {
    exact: true,
    path: '/student_center_/my_courses/layout/error_book/:examId',
    owner: '/',
    component: Loadable({
      loader: () => import('./live_course_list/error_book'),
      loading: () => <RouteLoading />
    })
  },
  {
    exact: true,
    path: '/student_center_/my_courses/layout/daily_challenge', // ?challengeId=10
    owner: '/',
    component: Loadable({
      loader: () => import('./daily_challenge/subpage'),
      loading: () => <RouteLoading />
    })
  },
  {
    exact: true,
    path: '/student_center_/my_courses/layout/daily_challenge_pad/:challengeId', // ?challengeId=10
    owner: '/',
    component: Loadable({
      loader: () => import('./daily_challenge/subpage_pad'),
      loading: () => <RouteLoading />
    })
  },
  {
    exact: true,
    path: '/student_center_/material/:tableId/:type',
    owner: '/',
    component: Loadable({
      loader: () => import('./material'),
      loading: () => <RouteLoading />
    })
  },
];